{include file="public/header"/}
{include file="public/add_header"/}
<form method="post" class="form-horizontal" action="save" id="layer-form">
    {if condition="$data['id']!=''"}<input type="hidden" value="{$data['id']}" name="id">{/if}
    <!--表单项-->
        
                <div class="form-group">
                    <label class="col-sm-2 control-label">名称</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="name" value="{$data['name']}" >
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">价格</label>
                    <div class="col-sm-10">
                        <input type="number" class="form-control" name="price" value="{$data['price']}" >
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">头像</label>
                    <div class="col-sm-10">
                        <input id="head_img" type="file">
                        <input id="head_img_previewImg"  type="hidden" name="head_img" value="{$data['head_img']}">
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">封面图</label>
                    <div class="col-sm-10">
                        <input id="cover_img" type="file">
                        <input id="cover_img_previewImg"  type="hidden" name="cover_img" value="{$data['cover_img']}">
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">截止时间</label>
                    <div class="col-sm-10">
                        <div class="input-group date">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            <input type="text" name="end_time" class="form-control" value="{$data['end_time']}" readonly>
                        </div>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">开始时间</label>
                    <div class="col-sm-10">
                        <div class="input-group date">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            <input type="text" name="start_time" class="form-control" value="{$data['start_time']}" readonly>
                        </div>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">简介</label>
                    <div class="col-sm-10">
                        <script  id="about_txt" name="about_txt" type="text/plain" >{$data['about_txt']}</script>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">公告</label>
                    <div class="col-sm-10">
                        <script  id="notice_txt" name="notice_txt" type="text/plain" >{$data['notice_txt']}</script>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">审核状态</label>
                    <div class="col-sm-10">
                        <select class="form-control" name="check">
                           <option value="0" {if condition="$data['check']==0"}selected{/if}>待审核</option>
                           <option value="1" {if condition="$data['check']==1"}selected{/if}>审核通过</option>
                           <option value="2" {if condition="$data['check']==2"}selected{/if}>审核不通过</option>
                        </select>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">类型</label>
                    <div class="col-sm-10">
                        <select class="form-control" name="type">
                           <option value="0" {if condition="$data['type']==0"}selected{/if}>普通</option>
                           <option value="1" {if condition="$data['type']==1"}selected{/if}>高级</option>
                           <option value="2" {if condition="$data['type']==2"}selected{/if}>特别</option>
                        </select>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">联系方式</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="tel" value="{$data['tel']}" >
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
    <!--/表单项-->
    {$html->submit_btn()}
</form>
{include file="public/add_footer"/}
{include file="public/footer"/}
<script type="text/javascript">
    $(function(){
        //百度编辑器
        UE.getEditor('about_txt');
        UE.getEditor('notice_txt');

        //图片上传控件
        initFileInput('head_img');
        initFileInput('cover_img');
    });
</script>